package baseserver

import "fmt"

type ICloseServer interface {
	Close()
}

var CloseServers []ICloseServer

func AddServer(server ICloseServer) {
	if CloseServers == nil {
		panic("coreserver 没有Init")
	}
	if server == nil {
		fmt.Println("server")
	}
	CloseServers = append(CloseServers, server)
}

func GetServers() []ICloseServer {
	return CloseServers
}

func init() {
	CloseServers = make([]ICloseServer, 0)
}
